<%@ include file="base.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript">
	$(document).ready(function() {
// 		var t = document.getElementById('id').value
		var t = <%=request.getParameter("id") %>
		var Request = new QueryString();
		word = Request["id"];
		alert(t);
// 		document.write(word);
	});
		person = function(name,age){
			this.name = name;
			this.age = age;
			this.say = function(){
				alert('person say: '+this.name+this.age);
			}
		}
		function hello(){
			var p = new person('dd',11);
			alert(p.name+p.age);
			p.say();
		}

		function QueryString() {
			var name, value, i;
			var str = location.href;
			alert(str);
			var num = str.indexOf("?")
			str = str.substr(num + 1);
			var arrtmp = str.split("&");
			for (i = 0; i < arrtmp.length; i++) {
				num = arrtmp[i].indexOf("=");
				if (num > 0) {
					name = arrtmp[i].substring(0, num);
					value = arrtmp[i].substr(num + 1);
					this[name] = value;
				}
			}
		}
	</script>
	<input type="button" value="test" onclick="hello()"/>
</body>
</html>